package com.shouer.doc.ui.splash.response;

import android.text.TextUtils;
import android.util.Log;

import com.google.gson.annotations.Expose;
import com.shouer.doc.request.BaseResponse;

/**
 * Created by ZXL on 2016/12/15.
 */

public class VersionUpdateResponse extends BaseResponse {

    @Expose
    private String version;
    @Expose
    private String appPath;
    @Expose
    private String reason;
    @Expose
    private String updateTag;
    @Expose
    private String loadPage1;
    @Expose
    private String loadPage2;
    @Expose
    private String loadPage3;
    @Expose
    private String loadPage4;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getAppPath() {
        return appPath;
    }

    public void setAppPath(String appPath) {
        this.appPath = appPath;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getUpdateTag() {
        return updateTag;
    }

    public void setUpdateTag(String updateTag) {
        this.updateTag = updateTag;
    }

    public String getLoadPage1() {
        return loadPage1;
    }

    public void setLoadPage1(String loadPage1) {
        this.loadPage1 = loadPage1;
    }

    public String getLoadPage2() {
        return loadPage2;
    }

    public void setLoadPage2(String loadPage2) {
        this.loadPage2 = loadPage2;
    }

    public String getLoadPage3() {
        return loadPage3;
    }

    public void setLoadPage3(String loadPage3) {
        this.loadPage3 = loadPage3;
    }

    public String getLoadPage4() {
        return loadPage4;
    }

    public void setLoadPage4(String loadPage4) {
        this.loadPage4 = loadPage4;
    }


    public String getAppFileName() {

        String appFileName = null;
        try {
            if (!TextUtils.isEmpty(appPath)) {
                appFileName = appPath.substring(appPath.lastIndexOf("/"), appPath.length());
            }
        } catch (Exception e) {
            Log.e(VersionUpdateResponse.class.getSimpleName(), "getAppFileName():" + e.toString());
        }

        return appFileName;
    }
}
